package com.tanhua.sso.controller;

import com.tanhua.sso.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

@RestController
@RequestMapping("user")
public class UserInfoController {

    @Autowired
    private UserInfoService userInfoService;
    @RequestMapping("loginReginfo")
    public Object loginReginfo(@RequestParam Map<String,Object> param, @RequestHeader("Authorization") String token){
        return this.userInfoService.loginReginfo(param, token);
    }

    @PostMapping("loginReginfo/head")
    public Object userLogo(@RequestHeader("Authorization")String token,@RequestParam ("headPhoto") MultipartFile multipartFile){

        return this.userInfoService.userLogo(token,multipartFile);
    }
}
